//@author: Greg
#include <iostream>
#include <string>
#include <vector>
#include <fstream>

#include "file_processor.h"

using namespace std;

//prototype
void style_files(vector<string> files);

int main()
{
	cout << "----- C++ Code beautifer -----" << endl;
	cout << "Please enter the root directory of all your code: ";

	//prompt the user for a directory
	string code_directory;	
	std::getline(cin, code_directory); //get the whole directory, include spaces
	wstring wstr_code_directory(code_directory.length(), L' '); //create a std::wstring with the same length as code_directory
	copy(code_directory.begin(), code_directory.end(), wstr_code_directory.begin()); //copy the string in code_directory to its wide string equivalent

	//get all files within the directory user entered
	File_processor file_manager;
	vector<string> files = file_manager.Get_files(wstr_code_directory); //get all the .cpp and .h files into files	

	style_files(files);

	return 0;
}

void style_files(vector<string> files)
{
	for (vector<string>::iterator iter = files.begin(); iter != files.end(); iter++)
	{
		string file_path = *iter;
		fstream file_stream;
		file_stream.open(file_path, fstream::in | fstream::out); //open the file, allowing input, output

		//pass this stream to the stylizer and format the string

		int x = 0;
	}
}